import Constant from 'src/config/Constant';
import { TypeOrmModule } from '@nestjs/typeorm';

const config = Constant.mysqlConfig
export default TypeOrmModule.forRoot({
    type: 'mysql',
    host: config.host,
    port: config.port,
    username: config.username,
    password: config.password,
    database: config.database,
    entities: [__dirname + '/entities/*.entity{.ts,.js}'],
    autoLoadEntities: true,
    synchronize: true,
    // logging: true, // 启用日志记录器
})
